跳到主要内容

webdav

cat > /usr/lib/systemd/system/webdav.service << EOF
[Unit]
Description=webdav Client Service
After=network.target

[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/opt/soft/web-dav/webdav -c /opt/soft/web-dav/config.yml
ExecReload=/opt/soft/web-dav/webdav reload -c /opt/soft/web-dav/config.yml
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target
EOF

config.yml


# Server related settings
address: 0.0.0.0
port: 3721
auth: true
tls: false
#cert: cert.pem
#key: key.pem
prefix: /opt/joplin

# Default user settings (will be merged)
scope: .
modify: true
rules: []

# CORS configuration
cors:
enabled: true
credentials: true
allowed_headers:
- Depth
#allowed_hosts:
#- *
allowed_methods:
- GET
exposed_headers:
- Content-Length
- Content-Range

users:
- username: root
password: aq123456
scope: /opt/soft/web-dav/data